package cn.edu.just.firstjavaapp.l17;

public class Main {
    public static void main(String[] args) throws InterruptedException {
        MyCountThread myCountThread = new MyCountThread();
        myCountThread.setName("张三");
        myCountThread.start();


        Thread thread = new Thread(new MyCountRunnable());
        thread.setName("李四");
        thread.start();

        Thread thread1 = new Thread(new MyCountRunnable());
        thread1.setName("王五");
        thread1.start();

        for(int i=1;i<=10;i++){
            System.out.println(Thread.currentThread().getName()+i);
            Thread.sleep(1000);
        }


    }
}
